\newproblem{lay:6_6_1}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 6.6.1}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
	Find the equation $y=\beta_0+\beta_1 x$ of the least-squares line, that better fits the points (0,1), (1,1), (2,2), (3,2).
}{
   % Solution
	We need to solve the overdetermined equation system
	\begin{center}
		$\begin{pmatrix}1 & 0 \\ 1 & 1 \\ 1 & 2 \\ 1 & 3\end{pmatrix}\begin{pmatrix}\beta_0 \\ \beta_1\end{pmatrix}=
		   \begin{pmatrix}1 \\ 1 \\ 2 \\ 2\end{pmatrix}$
	\end{center}
	which is of the form $X\mathbf{\beta}=\mathbf{y}$. Its least-squares solution is
	\begin{center}
		$\hat{\mathbf{\beta}}=(X^TX)^{-1}X^T\mathbf{y}$
	\end{center}
	that in this case is
	\begin{center}
		$\hat{\mathbf{\beta}}=\begin{pmatrix}0.9 \\ 0.4\end{pmatrix}$
	\end{center}
	That is, the least-squares line is defined as
	\begin{center}
		$y=0.9+0.4x$
	\end{center}
}
\useproblem{lay:6_6_1}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}

